package test0103.test02;

public class Department {
     String dname;
     int did;
     Position[] positions = new Position[2];
     int i =0;


    public Department() {
    }

    public Department(int did, String dname) {
        this.did = did;
        this.dname = dname;
    }

    public String getDname() {
        return dname;
    }

    public void setDname(String dname) {
        this.dname = dname;
    }

    public int getDid() {
        return did;
    }

    public void setDid(int did) {
        this.did = did;
    }

    @Override
    public String toString() {
        return "Department{" +
                "dname='" + dname + '\'' +
                ", did=" + did +
                '}';
    }

    public void addPosition(Position position) {
        positions[i++] = position;
    }
}
